// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "InteractItem.h"
#include "PerceptionNotify.h"
#include "BulletArrow.generated.h"

/**
 * 
 */
UCLASS()
class ISALONG2_API ABulletArrow : public AInteractItem, public IPerceptionNotify
{
	GENERATED_BODY()

private:
	UStaticMeshComponent* _displayMesh;
	float _hurtVal;

	bool _hitFired = false;

	AActor* _shoter;
	
public:
	ABulletArrow();

	virtual void OutlineOn() override;

	virtual void OutlineOff() override;

	virtual void PerceptionOutlineOn() override;

	virtual void PerceptionOutlineOff() override;
	
	void Fire(float hurtVal,float force,AActor* shoter);

	UFUNCTION()
	void OnHit(AActor* OtherActor, UPrimitiveComponent* OtherComponent, FVector NormalImpulse, const FHitResult& Hit);
};
